//
//  LongriseRouter.m
//  HttpDemo
//
//  Created by 程三 on 17/8/5.
//  Copyright © 2017年 程三. All rights reserved.
//

#import "LongriseRouter.h"


@implementation LongriseRouter

#pragma mark  打开一个类，传入类名，返回类的实例对象
+(id)openURL:(NSString *)className
{
    if(className)
    {
        Class class = NSClassFromString(className);
        if(class)
        {
            id obj = [[class alloc] init];
            return obj;
        }
    }
    return nil;
}
#pragma mark 判断某个实例对象实现了LongriseRouterDelegater代理
+(BOOL)isImplLongriseRouterDelegaterWithObject:(id)obj
{
    if(obj)
    {
        SEL sel = @selector(setParams:block:);
        if([obj respondsToSelector:sel])
        {
            return true;
        }
    }
    return false;
}
@end
